word = "bottles" # 赋予变量

for beer_num in range(99,0,-1):  #指定循环次数的起始、顺序和步长
    print(beer_num, word, "of beer on the wall.")
    print(beer_num, word, "of beer") # 输出数字依次减一的歌词
    print("take one down")
    print("pass it around.") # 拿酒歌词
    if beer_num == 1:  # 条件判断，当beer_num 等于1时，意味着拿走了墙上最后一瓶酒，歌词到最后一句
        print("no more bottle of beer on the wall.")
    else:  # 条件判断，beer_num未到1时，墙上的酒被依次持续拿下，赋予新变量，输出墙上还剩new_num = beer_num - 1 瓶酒歌词
        new_num = beer_num - 1
        if new_num == 1:
            word = "bottle" # 还剩一瓶时 bottle 单数
        print(new_num, word, "of beer on teh wall.") #输出墙上还剩new_num = beer_num - 1 瓶酒歌词
    print()# 结束空行，终止程序

